package com.cc.springbootthreadpooldemo.controller;

import com.cc.springbootthreadpooldemo.service.TestService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
@RequiredArgsConstructor
public class TestController {

    private final TestService testService;

    @GetMapping("/1")
    public String test() throws InterruptedException {
        testService.test();
        return "success";
    }
}
